/* 路由对象模块 */
import Vue from 'vue'
import VueRouter from 'vue-router'

/* import Msite from '../pages/Msite/Msite'
import Order from '../pages/Order/Order.vue'
import Profile from '../pages/Profile/Profile.vue'
import Login from '../pages/Login/login.vue'
import Search from '../pages/Search/Search.vue'
import UserInfo from '../pages/UserInfo/UserInfo.vue'
import shop from '../pages/shop/shop.vue' */
/* 懒加载路由 */
const Msite =()=>import('../pages/Msite/Msite.vue')
const Order = () => import ('../pages/Order/Order.vue')
const Profile = () => import('../pages/Profile/Profile.vue')
const Login = () => import('../pages/Login/login.vue')
const Search = () => import('../pages/Search/Search.vue')
const UserInfo = () =>import ('../pages/UserInfo/UserInfo.vue')
const shop = () => import('../pages/shop/shop.vue')



/* 声明使用插件 */
Vue.use(VueRouter)

export default new VueRouter({
  routes: [
    { path: '/', redirect: '/msite' },
    { path: '/msite', component: Msite, meta: { showFooter: true } },
    { path: '/order', component: Order, meta: { showFooter: true } },
    { path: '/profile', component: Profile, meta: { showFooter: true } },
    { path: '/search', component: Search, meta: { showFooter: true } },
    { path: '/login', component: Login, },
    { path: '/userinfo', component: UserInfo },
    { path: '/shop/:id', component: shop }
  ]
})
